<script setup lang="ts">
import type Typings from "@/typings";
import { defineOptions } from "vue";
import menuItem from "./components/menu-item.vue";

defineOptions({
  name: "xt-menu",
});

interface PropType {
  menuList: Typings.Menu.props[];
}

withDefaults(defineProps<PropType>(), {
  menuList: () => [],
});
</script>

<template>
  <el-menu class="xt-menu">
    <menu-item v-for="menu in menuList" :key="menu.path" :data="menu" />
  </el-menu>
</template>

<style lang="scss" scoped></style>
